package com.base.data.elasticsearch.core.query.simplify;


public class BaseQueryInfo<T> {
    protected String index;
    protected String type;

    public BaseQueryInfo(BaseQueryInfo.Builder builder) {
        this.index = builder.index;
        this.type = builder.type;
    }

    public String getIndex() {
        return this.index;
    }

    public void setIndex(String index) {
        this.index = index;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public static BaseQueryInfo.Builder builder() {
        return new BaseQueryInfo.Builder();
    }

    public static class Builder {
        protected String index;
        protected String type;

        public Builder() {
        }

        public BaseQueryInfo.Builder index(String index) {
            this.index = index;
            return this;
        }

        public BaseQueryInfo.Builder type(String type) {
            this.type = type;
            return this;
        }

        public BaseQueryInfo build() {
            return new BaseQueryInfo(this);
        }
    }
}
